package com.ruoyi.huanghefd.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 工作票检修设备试运行
 * @TableName worksheet_dev_try
 */
@TableName(value ="worksheet_dev_try")
@Data
public class WorksheetDevTry implements Serializable {
    /**
     * ID
     */
    @TableId
    private String wsId;

    /**
     * 工作票编号
     */
    private String wsCode;

    /**
     * 序号
     */
    private Integer wsOrder;

    /**
     * 允许试运行时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date tryTime;

    /**
     * 工作许可人ID
     */
    private String wsLicensorid;

    /**
     * 工作许可人
     */
    private String wsLicensor;

    /**
     * 工作负责人ID
     */
    private String wsPrincipalid;

    /**
     * 工作负责人
     */
    private String wsPrincipal;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WorksheetDevTry other = (WorksheetDevTry) that;
        return (this.getWsId() == null ? other.getWsId() == null : this.getWsId().equals(other.getWsId()))
            && (this.getWsCode() == null ? other.getWsCode() == null : this.getWsCode().equals(other.getWsCode()))
            && (this.getWsOrder() == null ? other.getWsOrder() == null : this.getWsOrder().equals(other.getWsOrder()))
            && (this.getTryTime() == null ? other.getTryTime() == null : this.getTryTime().equals(other.getTryTime()))
            && (this.getWsLicensorid() == null ? other.getWsLicensorid() == null : this.getWsLicensorid().equals(other.getWsLicensorid()))
            && (this.getWsLicensor() == null ? other.getWsLicensor() == null : this.getWsLicensor().equals(other.getWsLicensor()))
            && (this.getWsPrincipalid() == null ? other.getWsPrincipalid() == null : this.getWsPrincipalid().equals(other.getWsPrincipalid()))
            && (this.getWsPrincipal() == null ? other.getWsPrincipal() == null : this.getWsPrincipal().equals(other.getWsPrincipal()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getWsId() == null) ? 0 : getWsId().hashCode());
        result = prime * result + ((getWsCode() == null) ? 0 : getWsCode().hashCode());
        result = prime * result + ((getWsOrder() == null) ? 0 : getWsOrder().hashCode());
        result = prime * result + ((getTryTime() == null) ? 0 : getTryTime().hashCode());
        result = prime * result + ((getWsLicensorid() == null) ? 0 : getWsLicensorid().hashCode());
        result = prime * result + ((getWsLicensor() == null) ? 0 : getWsLicensor().hashCode());
        result = prime * result + ((getWsPrincipalid() == null) ? 0 : getWsPrincipalid().hashCode());
        result = prime * result + ((getWsPrincipal() == null) ? 0 : getWsPrincipal().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", wsId=").append(wsId);
        sb.append(", wsCode=").append(wsCode);
        sb.append(", wsOrder=").append(wsOrder);
        sb.append(", tryTime=").append(tryTime);
        sb.append(", wsLicensorid=").append(wsLicensorid);
        sb.append(", wsLicensor=").append(wsLicensor);
        sb.append(", wsPrincipalid=").append(wsPrincipalid);
        sb.append(", wsPrincipal=").append(wsPrincipal);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}